<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="base.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="style/top.css"/>
    <link rel="stylesheet" type="text/css" href="style/main.css"/>
	<link rel="stylesheet" type="text/css" href="style/footer.css"/>
    <title>搜索页</title>
    
  </head>
  <body>
	<%@ include file="template/head.jsp" %>
    <div style="margin-top: 10px">
    </div>
    
	<div id="wp" class="wp">
    	<div id="ct" class="wp cl">
        	<div class="mn">
        		
            	<div class="tl">
                	<div class="sttl mbn">
                    	<h2>
                        	结果：
                        	<em>
                            	找到相关内容
                                <span class="emfont">${page.totleSize }</span>
                         		 个
                            </em>
                        </h2>
                    </div>
                    <div class="slst mtw">
                    	<ul>
                    		<c:forEach items="${searchList }" var="article">
                        	<li class="pbw">
                            	<h3 class="xs3">
                            		<a href="article.jspx?_method=show&id=${article.id }">${article.name }</a>
                                </h3>
                                <p class="xg1">${article.clickNum }次点击 </p>
                                <div style="height: 100px; overflow: hidden;">
                                	<p>${article.content } </p>
                                </div>
                                <p>
                                	<span>${article.createdate }</span>
                                    -
                                    <span>
                                    	<a href="#">${article.user.username }</a>
                                    </span>
                                    -
                                    <span>
                                    	<a class="xi1" href="#"></a>
                                    </span>
                                </p>
                                <hr />
                            </li>
                            
                            </c:forEach>
                        </ul>
                    </div>
                </div>
                
             	<div >
             		<div class="pg">
             			<c:if test="${page.currentPage gt 7 and page.totlePages gt 10}">
                       		<a href="search.jspx?s_content=${scontent }&page=1">1..</a>
                       	</c:if>
               			<c:forEach items="${page.slider }" var="x">
               				<c:choose>
                				<c:when test="${page.currentPage eq x }">
                					<strong>${x }</strong>
                				</c:when>
                				<c:otherwise>
                					<a href="search.jspx?s_content=${scontent }&page=${x }">${x }</a>
                				</c:otherwise>
               				</c:choose>
               			</c:forEach>
               			<c:if test="${page.currentPage+4 lt page.totlePages and page.totlePages gt 10}">
               				<a href="search.jspx?s_content=${scontent }&page==${page.totlePages }">..${page.totlePages }</a>
               			</c:if>
               			<c:if test="${not page.last }">
               				<a class="nxt" href="search.jspx?s_content=${scontent }&page=${page.currentPage+1 }">下一页</a> 
               			</c:if>
                    </div>
             	</div>
            </div>
        </div>
    </div>


	<%@ include file="template/footer.jsp" %>

  </body>
</html>
